<template>
  <!--<yd-tabbar :exact=false  style="position:fixed;bottom:0;width:100%;z-index:999">
    <yd-tabbar-item title="首页" link="/home" @click.native="getBarActions('home')" active>
      <i slot="icon" style="font-size: 0.6rem;" class="yd-icon-home"></i>
    </yd-tabbar-item>
    <yd-tabbar-item title="问医" link="/seek" @click.native="getBarActions('seek')" :class="{red: isActive=='seek'}">
      <yd-icon slot="icon" style="font-size: 0.6rem;" class="yd-icon-home" name="wenzhen" custom></yd-icon>
    </yd-tabbar-item>
    <yd-tabbar-item title="我" link="/me" dot @click.native="getBarActions('me')">
      <i slot="icon" style="font-size: 0.6rem;" class="yd-icon-ucenter"></i>
    </yd-tabbar-item>
  </yd-tabbar>-->

  <footer class="yd-tabbar tabbbar-top-line-color yd-ls-tabbar-footer">
    <a href="index.html#/home" class="yd-tabbar-item" @click="getBarActives('home')" :class="{'yd-ls-tabbar-actives-color': isActive=='home'}">
      <span class="yd-tabbar-icon">
        <i class="yd-icon-home" style="font-size: 0.6rem;"></i>
        <span class="yd-tabbar-badge"></span>
        <span class="yd-tabbar-dot" v-if="isHome"></span>
      </span>
      <span class="yd-tabbar-txt">首页</span></a>
    <a href="seek.html" class="yd-tabbar-item" @click="getBarActives('seek')" :class="{'yd-ls-tabbar-actives-color': isActive=='seek'}">
      <span class="yd-tabbar-icon">
        <i class="yd-icon-home icon-custom-wenzhen" style="font-size: 0.6rem;"></i>
        <span class="yd-tabbar-badge"></span>
        <span class="yd-tabbar-dot" v-if="isSeek"></span>
      </span>
      <span class="yd-tabbar-txt">问医</span>
    </a>
    <a href="info.html" class="yd-tabbar-item" @click="getBarActives('me')" :class="{'yd-ls-tabbar-actives-color': isActive=='me'}">
      <span class="yd-tabbar-icon">
        <i class="yd-icon-ucenter" style="font-size: 0.6rem;"></i>
        <span class="yd-tabbar-badge"></span>
        <span class="yd-tabbar-dot" v-if="isMe"></span>
      </span>
      <span class="yd-tabbar-txt">我</span>
    </a>
  </footer>
</template>

<style>
  .yd-ls-tabbar-footer {
    color:  rgb(151, 151, 151);
    background-color: rgb(255, 255, 255);
    font-size: 0.24rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 999;
  }
  .yd-ls-tabbar-actives-color {
    color: rgb(9, 187, 7);
  }
</style>
<script>
  import { mapGetters } from 'vuex'

  export default{
	  props: {
      hrefname: String
    },
    computed: {
      ...mapGetters({
        isActive: 'getBarActive',
        isHomeUnread: 'getHomeUnread',
        isSeekUnread: 'getSeekUnread',
        isMeUnread: 'getMeUnread'
      }),
      isHome() {
        return this.isHomeUnread == 'false' ? false : true
      },
      isSeek() {
        return this.isSeekUnread == 'false' ? false : true
      },
      isMe() {
        return this.isMeUnread == 'false' ? false : true
      }
    },
	  data () {
	    return{
        activeColor: false
	    }
	  },
    methods: {
      getBarActives (type) {
       this.$store.dispatch('fetchBarActive', type)
      }
    },
    mounted() {
      /*active*/
    },
		components: {
		}
	}
</script>

